home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-05-01 | 36.4 KB | 958 lines | [TEXT/MPS ] |
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- #
- # Apple Macintosh Developer Technical Support
- #
- # MultiFinder-Aware SoundApp Application
- #
- # SoundApp
- #
- # SoundApp.r - Rez Source
- #
- # Jim Reekes - Macintosh Developer Technical Support
- # Copyright © 1989-1990 Apple Computer, Inc.
- # All rights reserved.
- #
- # Versions:
- # 1.03 May, 1990
- #
- # Components:
- # SoundApp.make May 1, 1990 MPW build script
- # SoundApp.p May 1, 1990 Pascal source code
- # SoundApp.r May 1, 1990 Rez source code
- # SoundAppSnds.r May 1, 1990 Rez source code
- # SoundUnit.p May 1, 1990 Pascal source code
- #
- # Formatting was done with FONT = Monaco, SIZE = 9, TABS = 3
- #
- # SoundApp.p is a sample application source file for demonstrating
- # the Sound Manager. It requires the use of the SoundUnit to handle
- # all of the sound routines. This portion of the source code handles the
- # application’s management of memory, errors, user interface, etc..
- #
- # Jim Reekes E.O., Macintosh Developer Technical Support
- # Tuesday, January 30, 1990 1:01 PM
- #
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
-
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // INCLUDES
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- #include "Types.r"
- #include "SysTypes.r"
-
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // CONSTANTS
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- // These #defines are used to set enable/disable flags of a menu
- #define AllItems 0b1111111111111111111111111111111 /* 31 bits worth of flags */
- #define NoItems 0b0000000000000000000000000000000
- #define MenuItem1 0b0000000000000000000000000000001
- #define MenuItem2 0b0000000000000000000000000000010
- #define MenuItem3 0b0000000000000000000000000000100
- #define MenuItem4 0b0000000000000000000000000001000
- #define MenuItem5 0b0000000000000000000000000010000
- #define MenuItem6 0b0000000000000000000000000100000
- #define MenuItem7 0b0000000000000000000000001000000
- #define MenuItem8 0b0000000000000000000000010000000
- #define MenuItem9 0b0000000000000000000000100000000
- #define MenuItem10 0b0000000000000000000001000000000
- #define MenuItem11 0b0000000000000000000010000000000
- #define MenuItem12 0b0000000000000000000100000000000
-
-
- /* These values are used in SIZE resource. */
-
- #define kMinSize 150 /*application’s minimum size (in K)*/
- #define kPrefSize 300 /*application’s preferred size (in K)*/
-
- /* This is the rectangle of where to place the icon in an alert. */
-
- #define kStdAlertIconRect {10, 20, 42, 52}
-
- /* These constants are the size of a standard button and the default button.
- In this application, the default button is always placed centered at the
- bottom of the window. */
-
- #define kButtonFrameInset -4 /* inset rectangle adjustment around button */
- #define kButtonSizeW 74
- #define kButtonSizeH 17
- #define kDafaultButSizeW (74 - kButtonFrameInset - kButtonFrameInset)
- #define kDafaultButSizeH (17 - kButtonFrameInset - kButtonFrameInset)
-
- /* These constants are used in defining the size of the application’s windows.
- All of the following windows are dymanically positioned on screen by
- the application. These values will change the height and width of the windows. */
-
- #define kExitAlertSizeH 129
- #define kExitAlertSizeW 248
- #define kUserAlertSizeH 129
- #define kUserAlertSizeW 304
- #define kSoundVolSizeH 96
- #define kSoundVolSizeW 240
- #define kAboutWindowSizeH 232
- #define kAboutWindowSizeW 336
- #define kStatusWindowSizeH 96
- #define kStatusWindowSizeW 240
-
- /* Believe it or not, I found this complication to be very useful.
- Normally, people tend to use ResEdit to change the layout of a window
- especially for dialogs. I have a difficult time getting the pixels
- exactly right using ResEdit. People said I could then DeRez the window
- and make the adjustments. This was just a difficult. I needed some
- scratch paper and a calculator. After thinking about it, I wrote these
- definitions of my window’s geometry. This ended up in a scheme that I
- found to be much more helpful in building the exact window I wanted. The
- document window has all items spaced apart from each a consistent amount.
- The size of the items are consistent and spaced equally apart from each
- other. */
-
- #define kSndStdSpacing 8 /* adjusts the relative spacing of the entire window */
- #define kSndButtonSizeW 100 /* SizeW of buttons in document window */
- #define kSndButtonSizeH 24 /* heigth of buttons in document window */
- #define kSndListButGap (16 + (2 * kSndStdSpacing)) /* list’s scroll bar and more */
- #define kSoundWindowSizeH ((5 * kSndStdSpacing) + (5 * kSndButtonSizeH) + kSndStdSpacing)
- #define kSoundWindowSizeW 296
-
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // RESOURCE ID NUMBERS
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // ICON resources from the system’s alert icons
- #define rNoteIcon 1 /*the note icon*/
- #define rCautionIcon 2 /*the caution icon*/
-
- // ALRT resources
- #define rExitAlert 1000 /*emergency exit user alert*/
- #define rUserAlert 1001 /*error message user alert*/
- #define rSoundVol 1002 /*volume too low message*/
- #define rSFPGetFileDLOG -4000 /*custom SFPGetFile dialog*/
-
- // application’s BNDL resources
- #define rAppBundle 1000 /*application’s bundle resource ID*/
- #define rAppSignature 'SAPP' /*applicaiton’s OS signature*/
-
- // ICON resources
- #define rMoofIcon 1000
-
- // ICN# resources
- #define rMoofIconList 1000
-
- // CNTL resources
- #define rCancelCntl 1000 /*button ID for the status window*/
- #define rPlaySndCntl 1001 /*button ID for the document window*/
- #define rHyperPlayCntl 1002 /*button ID for the document window*/
- #define rPlayScaleCntl 1003 /*button ID for the document window*/
- #define rPlayMelodyCntl 1004 /*button ID for the document window*/
- #define rStopCntl 1005 /*button ID for the document window*/
- #define rAboutOKCntl 1006 /*button ID for the about window*/
-
- // CURS resources
- #define rSndCursor 1000 /*document cursor ID*/
- #define rACursor1 1001 /*animated cursor ID*/
- #define rACursor2 1002 /*animated cursor ID*/
- #define rACursor3 1003 /*animated cursor ID*/
- #define rACursor4 1004 /*animated cursor ID*/
-
- // Menu resources. The following constants have a “m” prefix to notate they’re menus.
- #define rMenuBar 1000 /*application’s menu bar*/
- #define mApple 128 /*Apple menu*/
- #define mFile 129 /*File menu*/
- #define mEdit 130 /*Edit menu*/
- #define mDemos 1000 /*Demo menu*/
-
- // PICT resources
- #define rAppPict 1000 /*picture appearing in about window*/
-
- // RECT resources, custom made to order
- #define rListRectID 1000 /*size of list rectangle*/
-
- // STR resources
- #define rUntitled 1000 /*string for untitled snd resources*/
- #define rAboutText 1001 /*string for text appearing in about window*/
-
- // STR# resources. The following constants have a “s” prefix to notate they’re strings.
- #define sErrStrings 1000 /*error strings STR# ID*/
- #define sMessStrings 1001 /*message strings STR# ID for status window*/
- #define sSMErrStrings 1002 /*message strings of Sound Manager errors*/
-
- // WIND resources. All windows used in the application need a unique resource ID.
- #define rAboutWindow 1000 /*about dialog*/
- #define rStatusWindow 1001 /*status window ID used to show current sound*/
- #define rSoundWindow 1002 /*sound document window ID*/
-
-
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // RESOURCE TYPES
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- The animated cursor resource used in the MPW CursorCtl unit is not
- defined by MPW. So, I’ve created the type for it. */
-
- type 'acur' {
- integer = $$Countof(AcursArray); /*Number of cursors (“frames of film”)*/
- fill word; /*Next frame to show <for internal use>*/
- wide array AcursArray {
- integer; /*'CURS' resource id for frame #1*/
- fill word; /*<for internal use>*/
- };
- };
-
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- This is a definition for a resource which contains only a rectangle */
-
- type 'RECT' {
- rect;
- };
-
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // RESOURCE DEFINITIONS
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- This is the vers resource used by the Finder in the Get Info window.
- I also display the short version number in the about window. */
-
- resource 'vers' (1, purgeable) {
- 0x10, 0x03, final, 0x0, verUs,
- "1.03", "1.03, Copyright © 1989-90 Apple Computer"
- };
-
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- These are the resources used for the animated cursors. They are preloaded
- and non-purgeable to help reduce memory fragmentation. */
-
- resource 'acur' (0, preload, nonPurgeable) {
- {
- rACursor1, rACursor2, rACursor3, rACursor4
- }
- };
-
- resource 'CURS' (rACursor1, preload, nonPurgeable) {
- $"00 00 00 00 00 00 16 00 3E 01 54 03 C3 05 F3 FD"
- $"08 FA 0C 72 0C 02 0D F2 0A 0A 0A 0A 0A 0A 1C 1E",
- $"00 00 00 00 00 00 16 00 3E 01 7C 03 FF 07 FF FF"
- $"0F FE 0F FE 0F FE 0F FE 0E 0E 0E 0E 0E 0E 1C 1E",
- {4, 10}
- };
-
- resource 'CURS' (rACursor2, preload, nonPurgeable) {
- $"30 30 28 38 24 24 13 AC 0B C6 04 0C 02 36 02 36"
- $"02 E0 02 E0 0E E0 10 60 26 20 29 90 28 50 30 38",
- $"30 30 38 38 3C 3C 1F BC 0F FE 07 FC 03 F6 03 F6"
- $"03 E0 03 E0 0F E0 1F E0 3F E0 39 F0 38 70 30 38",
- {15, 7}
- };
-
- resource 'CURS' (rACursor3, preload, nonPurgeable) {
- $"00 00 06 C0 0A A0 12 90 14 58 17 D8 20 18 27 18"
- $"4F 18 9F CF E0 C3 80 2A 00 FC 00 D0",
- $"00 00 06 C0 0E E0 1E F0 1C 78 1F F8 3F F8 3F F8"
- $"7F F8 FF FF E0 FF 80 3E 00 FC 00 D0",
- {9, 6}
- };
-
- resource 'CURS' (rACursor4, preload, nonPurgeable) {
- $"0E 06 05 0A 04 CA 02 32 03 04 03 B8 03 A0 03 A0"
- $"36 20 36 20 18 10 31 E8 1A E4 12 12 0E 0A 06 06",
- $"0E 06 07 0E 07 CE 03 FE 03 FC 03 F8 03 E0 03 E0"
- $"37 E0 37 E0 1F F0 3F F8 1E FC 1E 1E 0E 0E 06 06",
- {6, 6}
- };
-
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- This is the cursor used when the cursor is over a sound document window. */
-
- resource 'CURS' (rSndCursor, preload, nonPurgeable) {
- $"03 80 04 C0 04 C0 04 C0 04 C0 04 C0 74 F8 9C AE"
- $"4C AB 24 0B 24 03 10 03 08 03 08 06 04 06 04 06",
- $"03 80 07 C0 07 C0 07 C0 07 C0 07 C0 77 F8 FF FE"
- $"7F FF 3F FF 3F FF 1F FF 0F FF 0F FE 07 FE 07 FE",
- {0, 7}
- };
-
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- These are the resources used to create the bungle package used by the Finder.
- I use type coerson to create my signature string. */
-
- type rAppSignature as 'STR ';
-
- resource rAppSignature (0, purgeable) {
- "SoundApp"
- };
-
- resource 'BNDL' (rAppBundle, purgeable) {
- rAppSignature, 0,
- {
- 'ICN#', {0, rMoofIconList},
- 'FREF', {0, rAppBundle}
- }
- };
-
- resource 'FREF' (rAppBundle, purgeable) {
- 'APPL', 0, ""
- };
-
- resource 'ICN#' (rMoofIconList, purgeable) {
- {
- /* [1] */
- $"04 30 40 00 0A 50 A0 00 0B 91 10 02 08 22 08 03"
- $"12 24 04 05 20 28 02 09 40 10 01 11 80 0C 00 A1"
- $"80 03 FF C2 7E 00 FF 04 01 00 7F 04 03 00 1E 08"
- $"04 E0 00 0C 08 E0 00 0A 10 E0 00 09 08 C0 00 06"
- $"04 87 FE 04 02 88 01 04 01 88 00 84 00 88 00 44"
- $"00 88 00 44 00 88 00 C4 01 10 01 88 02 28 03 10"
- $"01 C4 04 E0 00 02 08 00 73 BF FB EE 4C A2 8A 2A"
- $"40 AA AA EA 52 AA AA 24 5E A2 8A EA 73 BE FB 8E",
- /* [2] */
- $"04 30 40 00 0E 70 E0 00 0F F1 F0 02 0F E3 F8 03"
- $"1F E7 FC 07 3F EF FE 0F 7F FF FF 1F FF FF FF BF"
- $"FF FF FF FE 7F FF FF FC 01 FF FF FC 03 FF FF F8"
- $"07 FF FF FC 0F FF FF FE 1F FF FF FF 0F FF FF FE"
- $"07 FF FF FC 03 FF FF FC 01 FF FF FC 00 FF FF FC"
- $"00 FF FF FC 00 FF FF FC 01 FF FF F8 03 EF FF F0"
- $"01 C7 FC E0 00 03 F8 00 73 BF FB EE 7F BE FB EE"
- $"7F BE FB EE 7F BE FB E4 7F BE FB EE 73 BE FB 8E"
- }
- };
-
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- These are the resources used for an emergency exit alert. */
-
- resource 'ALRT' (rExitAlert, purgeable) {
- {0, 0, kExitAlertSizeH, kExitAlertSizeW}, rExitAlert,
- {
- /* [1] */ OK, visible, silent,
- /* [2] */ OK, visible, silent,
- /* [3] */ OK, visible, silent,
- /* [4] */ OK, visible, silent
- }
- };
-
- resource 'DITL' (rExitAlert, purgeable) {
- {
- /* [1] */ {
- (kExitAlertSizeH - kDafaultButSizeH), /* top */
- ((kExitAlertSizeW - kDafaultButSizeW) / 2), /* left */
- (kExitAlertSizeH - kDafaultButSizeH + kButtonSizeH), /* bottom */
- (((kExitAlertSizeW - kDafaultButSizeW) / 2) + kDafaultButSizeW) /* right */
- },
- Button {
- enabled, "OK"
- },
- /* [2] */ kStdAlertIconRect,
- Icon {
- disabled, rCautionIcon
- },
- /* [3] */ {8, 72, 40, 240},
- StaticText {
- disabled, "Sorry, an unrecoverable error has occurred!"
- },
- /* [4] */ {48, 8, 96, 240},
- StaticText {
- disabled, "^0"
- }
- }
- };
-
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- These are the resources used to display error messages to the user. */
-
- resource 'ALRT' (rUserAlert, purgeable) {
- {0, 0, kUserAlertSizeH, kUserAlertSizeW}, rUserAlert,
- {
- /* [1] */ OK, visible, silent,
- /* [2] */ OK, visible, silent,
- /* [3] */ OK, visible, silent,
- /* [4] */ OK, visible, silent
- }
- };
-
- resource 'DITL' (rUserAlert, purgeable) {
- {
- /* [1] */ {
- (kUserAlertSizeH - kDafaultButSizeH), /* top */
- ((kUserAlertSizeW - kDafaultButSizeW) / 2), /* left */
- (kUserAlertSizeH - kDafaultButSizeH + kButtonSizeH), /* bottom */
- (((kUserAlertSizeW - kDafaultButSizeW) / 2) + kDafaultButSizeW) /* right */
- },
- Button {
- enabled, "OK"
- },
- /* [2] */ {8, 72, 88, 296},
- StaticText {
- disabled, "^0\n(error = ^1)"
- },
- /* [3] */ kStdAlertIconRect,
- Icon {
- disabled, rCautionIcon
- }
- }
- };
-
- /* These are the strings used for error messages. */
- resource 'STR#' (sErrStrings, purgeable) {
- {
- "An error has occurred.";
- "A Memory Manager error has occurred.";
- "A Resource Manager error has occurred.";
- "That file is currently open and cannot be used.";
- "The wave table synthesizer is not available.";
- "This system does not support the Sound Manager; use System 6.0.2 or later.";
- "Memory is too low to continue. Try closing a window or increasing the SIZE resource.";
- "Could not find application’s menu resources.";
- "Could not initialize the Sound unit.";
- "The Sound Manager has encountered an error.";
- "Could not create a new document.";
- "Error initializing the status window.";
- "This file does not contain any sound resources.";
- }
- };
-
- /* These are a set of strings used to report Sound Manager errors. Instead of
- the error number, one of these strings will be used. These are only the set
- of Sound Manager errors. The equation to be used to include additional strings
- is the Sound Manager ABS(error) + noHardware) + 1. 200 is the first Sound Manager
- error number and 1 is the index, since GetIndString is 1 based. */
-
- resource 'STR#' (sSMErrStrings, purgeable) {
- {
- "no hardware available"; /* noHardware -200 */
- "not enough hardware available"; /* notEnoughHardware -201 */
- ""; /* not used -202 */
- "sound channel queue is full"; /* queueFull -203 */
- "problem with resource"; /* resProblem -204 */
- "bad sound channel"; /* badChannel -205 */
- "bad sound format"; /* badFormat -206 */
- }
- };
-
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- These are the resources used to tell the user about the sound volume. */
-
- resource 'ALRT' (rSoundVol, purgeable) {
- {0, 0, kSoundVolSizeH, kSoundVolSizeW}, rSoundVol,
- {
- /* [1] */ OK, visible, sound1,
- /* [2] */ OK, visible, sound1,
- /* [3] */ OK, visible, sound1,
- /* [4] */ OK, visible, sound1
- }
- };
-
- resource 'DITL' (rSoundVol, purgeable) {
- {
- /* [1] */ {
- (kSoundVolSizeH - kDafaultButSizeH), /* top */
- ((kSoundVolSizeW - kDafaultButSizeW) / 2), /* left */
- (kSoundVolSizeH - kDafaultButSizeH + kButtonSizeH), /* bottom */
- (((kSoundVolSizeW - kDafaultButSizeW) / 2) + kDafaultButSizeW) /* right */
- },
- Button {
- enabled, "OK"
- },
- /* [2] */ {8, 72, 56, 232},
- StaticText {
- disabled,
- "The sound volume is ^0. Use the Control Panel if you wish to adjust this."
- },
- /* [3] */ kStdAlertIconRect,
- Icon {
- disabled, rNoteIcon
- }
- }
- };
-
- /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- These are the resources for my custom Standard File dialog. */
-
- resource 'DLOG' (rSFPGetFileDLOG, purgeable) {
- {0, 0, 224, 348},
- dBoxProc, invisible, noGoAway, 0x0, rSFPGetFileDLOG, ""
- };
-
- resource 'DITL' (rSFPGetFileDLOG, purgeable) {
- {
- /* [1] */ {138, 256, 156, 336},
- Button {
- enabled, "Open"
- },
- /* [2] */ {1152, 59, 1232, 77},
- Button {
- enabled, ""
- },
- /* [3] */ {163, 256, 181, 336},
- Button {
- enabled, "Cancel"
- },
- /* [4] */ {39, 232, 59, 347},
- UserItem {
- disabled
- },
- /* [5] */ {68, 256, 86, 336},
- Button {
- enabled, "Eject"
- },
- /* [6] */ {93, 256, 111, 336},
- Button {
- enabled, "Drive"
- },
- /* [7] */ {39, 12, 185, 230},
- UserItem {
- enabled
- },
- /* [8] */ {39, 229, 185, 246},
- UserItem {
- enabled
- },
- /* [9] */ {124, 252, 125, 340},
- UserItem {
- disabled
- },
- /* [10] */ {1044, 20, 1145, 116},
- StaticText {
- disabled, ""
- },
- /* [11] */ {192, 16, 216, 288},
- CheckBox {
- enabled, "Show only files with sound resources"
- }
- }
- };
-
- /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- We use an MBAR resource to conveniently load all the menus */
-
- resource 'MBAR' (rMenuBar, preload) {
- {mApple, mFile, mEdit, mDemos};
- };
-
- resource 'MENU' (mApple, preload) { /* Disable dashed line, enable About and DAs */
- mApple, textMenuProc,
- (AllItems & ~MenuItem2),
- enabled, apple,
- {
- "About SoundApp…",
- noicon, nokey, nomark, plain;
- "-",
- noicon, nokey, nomark, plain
- }
- };
-
- resource 'MENU' (mFile, preload) { /* enable Quit and Open only, program enables others */
- mFile, textMenuProc,
- (NoItems | MenuItem2 | MenuItem12),
- enabled, "File",
- {
- "New",
- noicon, "N", nomark, plain;
- "Open…",
- noicon, "O", nomark, plain;
- "-",
- noicon, nokey, nomark, plain;
- "Close",
- noicon, "W", nomark, plain;
- "Save",
- noicon, "S", nomark, plain;
- "Save As…",
- noicon, nokey, nomark, plain;
- "Revert",
- noicon, nokey, nomark, plain;
- "-",
- noicon, nokey, nomark, plain;
- "Page Setup…",
- noicon, nokey, nomark, plain;
- "Print…",
- noicon, nokey, nomark, plain;
- "-",
- noicon, nokey, nomark, plain;
- "Quit",
- noicon, "Q", nomark, plain
- }
- };
-
- resource 'MENU' (mEdit, preload) { /* disable everything, program does the enabling */
- mEdit, textMenuProc,
- NoItems,
- enabled, "Edit",
- {
- "Undo",
- noicon, "Z", nomark, plain;
- "-",
- noicon, nokey, nomark, plain;
- "Cut",
- noicon, "X", nomark, plain;
- "Copy",
- noicon, "C", nomark, plain;
- "Paste",
- noicon, "V", nomark, plain;
- "Clear",
- noicon, nokey, nomark, plain
- }
- };
-
- resource 'MENU' (mDemos, preload) { /* enable everything except the dashed lines */
- mDemos, textMenuProc,
- (AllItems & ~MenuItem4),
- enabled, "Demos",
- {
- "Note Snth Scale",
- noicon, nokey, nomark, plain;
- "Note Snth Melody",
- noicon, nokey, nomark, plain;
- "Note Snth Timbres",
- noicon, nokey, nomark, plain;
- "-",
- noicon, nokey, nomark, plain;
- "Wave Snth Scale",
- noicon, nokey, nomark, plain;
- "Wave Snth Melody",
- noicon, nokey, nomark, plain;
- "Wave Snth Counterpoint",
- noicon, nokey, nomark, plain
- }
- };
-
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- The quintessential MultiFinder friendliness device, the SIZE resource */
-
- resource 'SIZE' (-1, purgeable) {
- dontSaveScreen,
- acceptSuspendResumeEvents,
- enableOptionSwitch,
- canBackground, /* we can background, but we don’t */
- multiFinderAware, /* we do our own activate/deactivate */
- backgroundAndForeground, /* this is not a background-only application! */
- dontGetFrontClicks, /* standard, don’t want front clicks */
- ignoreChildDiedEvents, /* I’m not a debugger and I don’t sub-launch */
- is32BitCompatible, /* this is a 32 bit clean application */
- reserved, reserved, reserved, reserved,
- reserved, reserved, reserved,
- kPrefSize * 1024,
- kMinSize * 1024
- };
-
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- These are the resources used for the application’s about window.
- The ICON is copied from the bundle resource’s ICN#. The cicn is also
- based on that. */
-
- resource 'WIND' (rAboutWindow, purgeable) {
- {0, 0, kAboutWindowSizeH, kAboutWindowSizeW}, altDBoxProc, visible, noGoAway, 0x0, ""
- };
-
- resource 'CNTL' (rAboutOKCntl, purgeable) {
- {
- (kAboutWindowSizeH - kDafaultButSizeH), /* top */
- ((kAboutWindowSizeW - kDafaultButSizeW) / 2), /* left */
- (kAboutWindowSizeH - kDafaultButSizeH + kButtonSizeH), /* bottom */
- (((kAboutWindowSizeW - kDafaultButSizeW) / 2) + kDafaultButSizeW) /* right */
- },
- 0, visible, 0, 0, pushButProc, 0, "OK"
- };
-
- resource 'STR ' (rAboutText, purgeable) {
- "“^0” version ^1\n"
- "A sample application using the Sound Manager.\n\n"
- "Brought to you by Jim Reekes\n"
- "Macintosh Developer Technical Support\n"
- "Copyright © 1989-90 Apple Computer\n\n"
- "We’d go Moof!™ for you, but Vince won’t let us."
- };
-
- resource 'ICON' (rMoofIcon, purgeable) {
- /* [1] */
- $"04 30 40 00 0A 50 A0 00 0B 91 10 02 08 22 08 03"
- $"12 24 04 05 20 28 02 09 40 10 01 11 80 0C 00 A1"
- $"80 03 FF C2 7E 00 FF 04 01 00 7F 04 03 00 1E 08"
- $"04 E0 00 0C 08 E0 00 0A 10 E0 00 09 08 C0 00 06"
- $"04 87 FE 04 02 88 01 04 01 88 00 84 00 88 00 44"
- $"00 88 00 44 00 88 00 C4 01 10 01 88 02 28 03 10"
- $"01 C4 04 E0 00 02 08 00 73 BF FB EE 4C A2 8A 2A"
- $"40 AA AA EA 52 AA AA 24 5E A2 8A EA 73 BE FB 8E",
- };
-
- resource 'cicn' (rMoofIcon, purgeable) {
-
- #ifndef MPW32
- 16, {0, 0, 32, 32}, 0, unpacked, 0, 0x48, 0x48, chunky,
- 4, 1, 4, 0, 0, 4, {0, 0, 32, 32}, 4, {0, 0, 32, 32},
- #else
- {0, 0, 32, 32}, 4,
- #endif
-
- $"0430 4000 0E70 E000 0FF1 F002 0FE3 F803"
- $"1FE7 FC07 3FEF FE0F 7FFF FF1F FFFF FFBF"
- $"FFFF FFFE 7FFF FFFC 01FF FFFC 03FF FFF8"
- $"07FF FFFC 0FFF FFFE 1FFF FFFF 0FFF FFFE"
- $"07FF FFFC 03FF FFFC 01FF FFFC 00FF FFFC"
- $"00FF FFFC 00FF FFFC 01FF FFF8 03EF FFF0"
- $"01C7 FCE0 0003 F800 73BF FBEE 7FBE FBEE"
- $"7FBE FBEE 7FBE FBE4 7FBE FBEE 73BE FB8E",
- $"0430 4000 0A50 A000 0B91 1002 0822 0803"
- $"1224 0405 2028 0209 4010 0111 800C 00A1"
- $"8003 FFC2 7E00 FF04 0100 7F04 0300 1E08"
- $"04E0 000C 08E0 000A 10E0 0009 08C0 0006"
- $"0487 FE04 0288 0104 0188 0084 0088 0044"
- $"0088 0044 0088 00C4 0110 0188 0228 0310"
- $"01C4 04E0 0002 0800 73BF FBEE 4CA2 8A2A"
- $"40AA AAEA 52AA AA24 5EA2 8AEA 73BE FB8E",
- #ifndef MPW32
- 0x0,
- 0,
- #endif
- { /* array ColorSpec: 4 elements */
- /* [1] */ 0, 65535, 65535, 65535,
- /* [2] */ 1, 0, 0, 0,
- /* [3] */ 2, 5098, 49151, 9110,
- /* [4] */ 3, 65535, 5898, 5898
- },
- $"0000 0F00 00FF 0000 0F00 0000 0000 0000"
- $"0000 F0F0 0F0F 0000 F2F0 0000 0000 0000"
- $"0000 F0FF F00F 000F 222F 0000 0000 00F0"
- $"0000 F000 00F0 00F2 2222 F000 0000 00FF"
- $"000F 00F0 00F0 0F22 2222 2F00 0000 0F0F"
- $"00F0 0000 00F0 F222 2222 22F0 0000 F00F"
- $"0F00 0000 000F 2222 2222 222F 000F 000F"
- $"F000 0000 0000 FF22 2222 2222 F0F0 000F"
- $"F000 0000 0000 00FF FFFF FFFF FF00 00F0"
- $"0FFF FFF0 0000 0000 FFFF FFFF 0000 0F00"
- $"0000 000F 0000 0000 0FFF FFFF 0000 0F00"
- $"0000 00FF 0000 0000 000F FFF0 0000 F000"
- $"0000 0F22 FFF0 0000 0000 0000 0000 FF00"
- $"0000 F222 FFF0 0000 0000 0000 0000 F200"
- $"000F 2222 FFF0 0000 0000 0000 0000 F22F"
- $"0000 F222 FF00 0000 0000 0000 0000 0FF0"
- $"0000 0F22 F000 0FFF FFFF FFF0 0000 0F00"
- $"0000 00F2 F000 F222 2222 222F 0000 0F00"
- $"0000 000F F000 F222 2222 2222 F000 0F00"
- $"0000 0000 F000 F222 2222 2222 2F00 0F00"
- $"0000 0000 F000 F222 2222 2222 2F00 0F00"
- $"0000 0000 F000 F222 2222 2222 FF00 0F00"
- $"0000 000F 000F 2222 2222 222F F000 F000"
- $"0000 00F0 00F0 F222 2222 22FF 000F 0000"
- $"0000 000F FF00 0F22 2222 2F00 FFF0 0000"
- $"0000 0000 0000 00F2 2222 F000 0000 0000"
- $"0FFF 00FF F0FF FFFF FFFF F0FF FFF0 FFF0"
- $"0F33 FF33 F0F3 33F0 F333 F0F3 33F0 F3F0"
- $"0F33 3333 F0F3 F3F0 F3F3 F0F3 FFF0 F3F0"
- $"0F3F 33F3 F0F3 F3F0 F3F3 F0F3 33F0 0F00"
- $"0F3F FFF3 F0F3 33F0 F333 F0F3 FFF0 F3F0"
- $"0FFF 00FF F0FF FFF0 FFFF F0FF F000 FFF0"
- };
-
- resource 'PICT' (rAppPict, purgeable) {
- 3396, {110, 108, 151, 350},
- $"0011 02FF 0C00 FFFF FFFF 006C 0000 006E 0000 015E 0000 0097 0000 0000 0000 001E"
- $"0001 000A 006E 006C 0097 015E 0099 80FA 006E 006C 0097 0165 0000 0000 0000 0000"
- $"0048 0000 0048 0000 0000 0008 0001 0008 0000 0000 0000 1F10 0000 0000 0000 0791"
- $"8000 00FF 0800 FFFF FFFF FFFF 0800 FFFF FFFF CCCC 0800 FFFF FFFF 9999 0800 FFFF"
- $"FFFF 6666 0800 FFFF FFFF 3333 0800 FFFF FFFF 0000 0800 FFFF CCCC FFFF 0800 FFFF"
- $"CCCC CCCC 0800 FFFF CCCC 9999 0800 FFFF CCCC 6666 0800 FFFF CCCC 3333 0800 FFFF"
- $"CCCC 0000 0800 FFFF 9999 FFFF 0800 FFFF 9999 CCCC 0800 FFFF 9999 9999 0800 FFFF"
- $"9999 6666 0800 FFFF 9999 3333 0800 FFFF 9999 0000 0800 FFFF 6666 FFFF 0800 FFFF"
- $"6666 CCCC 0800 FFFF 6666 9999 0800 FFFF 6666 6666 0800 FFFF 6666 3333 0800 FFFF"
- $"6666 0000 0800 FFFF 3333 FFFF 0800 FFFF 3333 CCCC 0800 FFFF 3333 9999 0800 FFFF"
- $"3333 6666 0800 FFFF 3333 3333 0800 FFFF 3333 0000 0800 FFFF 0000 FFFF 0800 FFFF"
- $"0000 CCCC 0800 FFFF 0000 9999 0800 FFFF 0000 6666 0800 FFFF 0000 3333 0800 FFFF"
- $"0000 0000 0800 CCCC FFFF FFFF 0800 CCCC FFFF CCCC 0800 CCCC FFFF 9999 0800 CCCC"
- $"FFFF 6666 0800 CCCC FFFF 3333 0800 CCCC FFFF 0000 0800 CCCC CCCC FFFF 0800 CCCC"
- $"CCCC CCCC 0800 CCCC CCCC 9999 0800 CCCC CCCC 6666 0800 CCCC CCCC 3333 0800 CCCC"
- $"CCCC 0000 0800 CCCC 9999 FFFF 0800 CCCC 9999 CCCC 0800 CCCC 9999 9999 0800 CCCC"
- $"9999 6666 0800 CCCC 9999 3333 0800 CCCC 9999 0000 0800 CCCC 6666 FFFF 0800 CCCC"
- $"6666 CCCC 0800 CCCC 6666 9999 0800 CCCC 6666 6666 0800 CCCC 6666 3333 0800 CCCC"
- $"6666 0000 0800 CCCC 3333 FFFF 0800 CCCC 3333 CCCC 0800 CCCC 3333 9999 0800 CCCC"
- $"3333 6666 0800 CCCC 3333 3333 0800 CCCC 3333 0000 0800 CCCC 0000 FFFF 0800 CCCC"
- $"0000 CCCC 0800 CCCC 0000 9999 0800 CCCC 0000 6666 0800 CCCC 0000 3333 0800 CCCC"
- $"0000 0000 0800 9999 FFFF FFFF 0800 9999 FFFF CCCC 0800 9999 FFFF 9999 0800 9999"
- $"FFFF 6666 0800 9999 FFFF 3333 0800 9999 FFFF 0000 0800 9999 CCCC FFFF 0800 9999"
- $"CCCC CCCC 0800 9999 CCCC 9999 0800 9999 CCCC 6666 0800 9999 CCCC 3333 0800 9999"
- $"CCCC 0000 0800 9999 9999 FFFF 0800 9999 9999 CCCC 0800 9999 9999 9999 0800 9999"
- $"9999 6666 0800 9999 9999 3333 0800 9999 9999 0000 0800 9999 6666 FFFF 0800 9999"
- $"6666 CCCC 0800 9999 6666 9999 0800 9999 6666 6666 0800 9999 6666 3333 0800 9999"
- $"6666 0000 0800 9999 3333 FFFF 0800 9999 3333 CCCC 0800 9999 3333 9999 0800 9999"
- $"3333 6666 0800 9999 3333 3333 0800 9999 3333 0000 0800 9999 0000 FFFF 0800 9999"
- $"0000 CCCC 0800 9999 0000 9999 0800 9999 0000 6666 0800 9999 0000 3333 0800 9999"
- $"0000 0000 0800 6666 FFFF FFFF 0800 6666 FFFF CCCC 0800 6666 FFFF 9999 0800 6666"
- $"FFFF 6666 0800 6666 FFFF 3333 0800 6666 FFFF 0000 0800 6666 CCCC FFFF 0800 6666"
- $"CCCC CCCC 0800 6666 CCCC 9999 0800 6666 CCCC 6666 0800 6666 CCCC 3333 0800 6666"
- $"CCCC 0000 0800 6666 9999 FFFF 0800 6666 9999 CCCC 0800 6666 9999 9999 0800 6666"
- $"9999 6666 0800 6666 9999 3333 0800 6666 9999 0000 0800 6666 6666 FFFF 0800 6666"
- $"6666 CCCC 0800 6666 6666 9999 0800 6666 6666 6666 0800 6666 6666 3333 0800 6666"
- $"6666 0000 0800 6666 3333 FFFF 0800 6666 3333 CCCC 0800 6666 3333 9999 0800 6666"
- $"3333 6666 0800 6666 3333 3333 0800 6666 3333 0000 0800 6666 0000 FFFF 0800 6666"
- $"0000 CCCC 0800 6666 0000 9999 0800 6666 0000 6666 0800 6666 0000 3333 0800 6666"
- $"0000 0000 0800 3333 FFFF FFFF 0800 3333 FFFF CCCC 0800 3333 FFFF 9999 0800 3333"
- $"FFFF 6666 0800 3333 FFFF 3333 0800 3333 FFFF 0000 0800 3333 CCCC FFFF 0800 3333"
- $"CCCC CCCC 0800 3333 CCCC 9999 0800 3333 CCCC 6666 0800 3333 CCCC 3333 0800 3333"
- $"CCCC 0000 0800 3333 9999 FFFF 0800 3333 9999 CCCC 0800 3333 9999 9999 0800 3333"
- $"9999 6666 0800 3333 9999 3333 0800 3333 9999 0000 0800 3333 6666 FFFF 0800 3333"
- $"6666 CCCC 0800 3333 6666 9999 0800 3333 6666 6666 0800 3333 6666 3333 0800 3333"
- $"6666 0000 0800 3333 3333 FFFF 0800 3333 3333 CCCC 0800 3333 3333 9999 0800 3333"
- $"3333 6666 0800 3333 3333 3333 0800 3333 3333 0000 0800 3333 0000 FFFF 0800 3333"
- $"0000 CCCC 0800 3333 0000 9999 0800 3333 0000 6666 0800 3333 0000 3333 0800 3333"
- $"0000 0000 0800 0000 FFFF FFFF 0800 0000 FFFF CCCC 0800 0000 FFFF 9999 0800 0000"
- $"FFFF 6666 0800 0000 FFFF 3333 0800 0000 FFFF 0000 0800 0000 CCCC FFFF 0800 0000"
- $"CCCC CCCC 0800 0000 CCCC 9999 0800 0000 CCCC 6666 0800 0000 CCCC 3333 0800 0000"
- $"CCCC 0000 0800 0000 9999 FFFF 0800 0000 9999 CCCC 0800 0000 9999 9999 0800 0000"
- $"9999 6666 0800 0000 9999 3333 0800 0000 9999 0000 0800 0000 6666 FFFF 0800 0000"
- $"6666 CCCC 0800 0000 6666 9999 0800 0000 6666 6666 0800 0000 6666 3333 0800 0000"
- $"6666 0000 0800 0000 3333 FFFF 0800 0000 3333 CCCC 0800 0000 3333 9999 0800 0000"
- $"3333 6666 0800 0000 3333 3333 0800 0000 3333 0000 0800 0000 0000 FFFF 0800 0000"
- $"0000 CCCC 0800 0000 0000 9999 0800 0000 0000 6666 0800 0000 0000 3333 0800 EEEE"
- $"0000 0000 0800 DDDD 0000 0000 0800 BBBB 0000 0000 0800 AAAA 0000 0000 0800 8888"
- $"0000 0000 0800 7777 0000 0000 0800 5555 0000 0000 0800 4444 0000 0000 0800 2222"
- $"0000 0000 0800 1111 0000 0000 0800 0000 EEEE 0000 0800 0000 DDDD 0000 0800 0000"
- $"BBBB 0000 0800 0000 AAAA 0000 0800 0000 8888 0000 2000 AAAA AAAA AAAA 2000 DDDD"
- $"DDDD DDDD 2000 0000 0000 1111 2000 0000 0000 4444 2000 0000 0000 7777 2000 0000"
- $"0000 AAAA 2000 0000 0000 DDDD 2000 0000 1111 0000 2000 0000 4444 0000 2000 0003"
- $"D0D7 0001 2000 1111 1111 1111 2000 2222 2222 2222 2000 4444 4444 4444 2000 5555"
- $"5555 5555 2000 7777 7777 7777 2000 8888 8888 8888 2000 BBBB BBBB BBBB 2000 EEEE"
- $"EEEE EEEE 2000 0000 0000 2222 2000 0000 0000 5555 2000 0000 0000 8888 2000 0000"
- $"0000 BBBB 2000 0000 0000 EEEE 2000 0000 2222 0000 2000 0000 5555 0000 0800 0000"
- $"0000 0000 006E 006C 0097 015E 006E 006C 0097 015E 0000 000A 006E 006C 0097 015E"
- $"0481 0087 0004 8100 8700 0481 0087 0004 8100 8700 08F9 0081 FF9E FFF2 000C F900"
- $"00FF 81EF A0EF 00FF F200 0CF9 0000 FF81 EFA0 EF00 FFF2 000C F900 00FF 81EF A0EF"
- $"00FF F200 0FF9 0000 FF8B EF01 0000 98EF 00FF F200 17F9 0000 FFD5 EF01 0000 BBEF"
- $"FD00 F1EF FE00 ABEF 00FF F200 16F9 0000 FFDD EFF8 00B9 EFFD 00F1 EFFE 00AC EF00"
- $"FFF2 001A F900 00FF DEEF FD00 FEEF FE00 B9EF FD00 F1EF FD00 ADEF 00FF F200 1BF9"
- $"0000 FFE0 EFFC 00FD EF01 0000 B8EF FD00 F1EF FC00 AEEF 00FF F200 36F9 0000 FFE1"
- $"EFFC 00FD EFFE 00F7 EFFB 00F7 EFFD 00FE EFFC 00F7 EF02 0000 EFFC 00F5 EFF8 00F1"
- $"EFFB 00F4 EFF9 00F5 EFF9 00D8 EF00 FFF2 0037 F900 00FF E3EF FB00 F2EF F700 F9EF"
- $"FD00 FDEF FD00 F8EF F700 F7EF FD00 01EF EFFC 00F1 EFFB 00F5 EFF5 00F8 EFFD 0000"
- $"EFFB 00DB EF00 FFF2 0047 F900 00FF E3EF FC00 F3EF FD00 FEEF FD00 F9EF FC00 FEEF"
- $"FC00 F9EF FC00 01EF EFFC 00F9 EFFC 00FE EFFC 00F2 EF02 0000 EFFD 00F6 EFFD 00FD"
- $"EFFD 00F9 EFFC 00FE EFFC 00DC EF00 FFF2 0047 F900 00FF E3EF FA00 F6EF FD00 FDEF"
- $"FD00 F9EF FD00 FDEF FD00 F8EF FD00 FDEF FD00 F9EF FD00 FDEF FC00 F2EF 0300 00EF"
- $"EFFD 00F7 EFFC 00FD EFFC 00FA EFFC 00FE EFFB 00DE EF00 FFF2 0047 F900 00FF E2EF"
- $"FA00 F8EF FD00 FDEF FC00 FAEF FC00 FEEF FC00 F8EF FD00 FDEF FD00 F9EF FD00 FCEF"
- $"FD00 F2EF 0100 00FE EFFD 00F6 EFFD 00FC EFFC 00FB EFFC 00FC EFFC 00E0 EF00 FFF2"
- $"0046 F900 00FF E2EF FA00 F9EF FD00 FDEF FC00 FAEF FC00 FDEF FD00 F8EF FC00 FEEF"
- $"FC00 F9EF FD00 FCEF FD00 F2EF FE00 FEEF FD00 F7EF FC00 FCEF FD00 FAEF FC00 FCEF"
- $"FC00 E1EF 00FF F200 42F9 0000 FFE1 EFFC 00F9 EFFD 00FC EFFC 00FA EFFC 00FE EFFC"
- $"00F8 EFFD 00FD EFFC 00F9 EFFD 00FC EFFD 00F2 EFF6 00F7 EFFD 00FC EFFC 00FA EFFC"
- $"00FC EFFC 00E2 EF00 FFF2 004B F900 00FF E9EF 0100 00FB EFFC 00FA EFFD 00FC EFFC"
- $"00FA EFFC 00FD EFFC 00F8 EFFD 00FD EFFC 00F9 EFFD 00FC EFFC 00F3 EFFE 00FC EFFD"
- $"00F8 EFFC 00FC EFFC 00FA EFFC 00FC EFFC 00E3 EF00 FFF2 004B F900 00FF EAEF 0100"
- $"00FB EFFC 00FA EFFC 00FD EFFC 00F9 EFFC 00FD EFFD 00F7 EFFD 00FD EFFC 00F9 EFFC"
- $"00FD EFFC 00F3 EFFE 00FB EFFD 00F8 EFFC 00FC EFFD 00F9 EFFB 00FD EFFC 00E4 EF00"
- $"FFF2 004B F900 00FF ECEF FD00 FCEF FD00 F8EF FD00 FDEF FD00 F8EF FB00 01EF EFFB"
- $"00F8 EFFC 00FD EFFC 00F9 EFFC 00FD EFFC 00F3 EFFE 00FA EFFD 00F8 EFFC 00FD EFFC"
- $"00F9 EFFB 00FE EFFC 00E4 EF00 FFF2 0040 F900 00FF EDEF FD00 FDEF FC00 F7EF F700"
- $"F5EF F400 F9EF FB00 FEEF FC00 F7EF F200 F5EF FE00 FAEF FB00 FAEF FA00 01EF EFFD"
- $"00F7 EFFA 0001 EFEF FD00 E4EF 00FF F200 3BF9 0000 FFEB EFF8 00F4 EFFA 00F2 EFFC"
- $"0000 EFF9 00FB EFFA 0000 EFF9 00F7 EFFB 0001 EFEF FE00 F3EF FC00 FDEF F800 FBEF"
- $"F700 F4EF F600 E3EF 00FF F200 14F9 0000 FF81 EFDF EFFB 00EF EFFC 00DF EF00 FFF2"
- $"0014 F900 00FF 81EF DEEF FC00 EEEF FC00 E0EF 00FF F200 14F9 0000 FF81 EFDE EFFB"
- $"00EE EFFC 00E1 EF00 FFF2 0014 F900 00FF 81EF DDEF FC00 EDEF FC00 E2EF 00FF F200"
- $"14F9 0000 FF81 EFDC EFFB 00EE EFFB 00E4 EF00 FFF2 0014 F900 00FF 81EF DBEF FA00"
- $"EFEF FA00 E6EF 00FF F200 0CF9 0000 FF81 EFA0 EF00 FFF2 000C F900 00FF 81EF A0EF"
- $"00FF F200 0CF9 0000 FF81 EFA0 EF00 FFF2 0008 F900 81FF 9EFF F200 0481 0087 0004"
- $"8100 8700 0481 0087 0004 8100 8700 0481 0087 0004 8100 8700 00FF"
- };
-
-
- /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- These are the resources used used for the sound status window. */
-
- resource 'WIND' (rStatusWindow, purgeable) {
- {0, 0, kStatusWindowSizeH, kStatusWindowSizeW}, documentProc, invisible, noGoAway, 0x0, "Sound Status"
- };
-
- resource 'CNTL' (rCancelCntl, purgeable) {
- {
- (kStatusWindowSizeH - kDafaultButSizeH), /* top */
- ((kStatusWindowSizeW - kDafaultButSizeW) / 2), /* left */
- (kStatusWindowSizeH - kDafaultButSizeH + kButtonSizeH), /* bottom */
- (((kStatusWindowSizeW - kDafaultButSizeW) / 2) + kDafaultButSizeW) /* right */
- },
- 0, visible, 0, 0, pushButProc, 0, "Stop"
- };
-
- resource 'STR#' (sMessStrings, purgeable) {
- {
- "Playing the sound asynchronously.";
- "Playing the sound asynchronously resampled to middle C.";
- "Playing a C major scale.";
- "Playing “Promenade” from\n Pictures At An Exhibition,\n by Mussorgsky.";
- "Playing middle C with the various timbres.";
- "Playing “Schaut, ihr Sünder”\n by Löwenstern,\n arranged by JS Bach.";
- }
- };
-
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- These are the resources used for the sound document window. This includes
- a string resource that is the name given to an untitled sound resource
- to appear in the list. */
-
- resource 'WIND' (rSoundWindow, purgeable) {
- {0, 0, kSoundWindowSizeH, kSoundWindowSizeW}, documentProc, invisible, goAway, 0x0, ""
- };
-
- /* This rectangle is the position of the list in the document window. The rectangle
- is the size of the WIND inset by kSndStdSpacing and to the left of the buttons. */
- resource 'RECT' (rListRectID, purgeable) {
- {
- kSndStdSpacing,
- kSndStdSpacing,
- (kSoundWindowSizeH - kSndStdSpacing),
- (kSoundWindowSizeW - kSndButtonSizeW - kSndStdSpacing - kSndListButGap)}
- };
-
- resource 'CNTL' (rPlaySndCntl, purgeable) {
- /* [1] */ {
- ((1 * kSndStdSpacing) + (1 * kSndButtonSizeH) - kSndButtonSizeH), /* top */
- (kSoundWindowSizeW - kSndButtonSizeW - kSndStdSpacing), /* left */
- ((1 * kSndStdSpacing) + (1 * kSndButtonSizeH)), /* bottom */
- (kSoundWindowSizeW - kSndStdSpacing) /* right */
- },
- 0, visible, 0, 0, pushButProcUseWFont, 0, "Play Sound"
- };
-
- resource 'CNTL' (rHyperPlayCntl, purgeable) {
- /* [2] */ {
- ((2 * kSndStdSpacing) + (2 * kSndButtonSizeH) - kSndButtonSizeH), /* top */
- (kSoundWindowSizeW - kSndButtonSizeW - kSndStdSpacing), /* left */
- ((2 * kSndStdSpacing) + (2 * kSndButtonSizeH)), /* bottom */
- (kSoundWindowSizeW - kSndStdSpacing) /* right */
- },
- 0, visible, 0, 0, pushButProcUseWFont, 0, "Hyper Play"
- };
-
- resource 'CNTL' (rPlayScaleCntl, purgeable) {
- /* [3] */ {
- ((3 * kSndStdSpacing) + (3 * kSndButtonSizeH) - kSndButtonSizeH), /* top */
- (kSoundWindowSizeW - kSndButtonSizeW - kSndStdSpacing), /* left */
- ((3 * kSndStdSpacing) + (3 * kSndButtonSizeH)), /* bottom */
- (kSoundWindowSizeW - kSndStdSpacing) /* right */
- },
- 0, visible, 0, 0, pushButProcUseWFont, 0, "Play Scale"
- };
-
- resource 'CNTL' (rPlayMelodyCntl, purgeable) {
- /* [4] */ {
- ((4 * kSndStdSpacing) + (4 * kSndButtonSizeH) - kSndButtonSizeH), /* top */
- (kSoundWindowSizeW - kSndButtonSizeW - kSndStdSpacing), /* left */
- ((4 * kSndStdSpacing) + (4 * kSndButtonSizeH)), /* bottom */
- (kSoundWindowSizeW - kSndStdSpacing) /* right */
- },
- 0, visible, 0, 0, pushButProcUseWFont, 0, "Play Melody"
- };
-
- resource 'CNTL' (rStopCntl, purgeable) {
- /* [5] */ {
- ((5 * kSndStdSpacing) + (5 * kSndButtonSizeH) - kSndButtonSizeH), /* top */
- (kSoundWindowSizeW - kSndButtonSizeW - kSndStdSpacing), /* left */
- ((5 * kSndStdSpacing) + (5 * kSndButtonSizeH)), /* bottom */
- (kSoundWindowSizeW - kSndStdSpacing) /* right */
- },
- 0, visible, 0, 0, pushButProcUseWFont, 0, "Stop Sound"
- };
-
- resource 'STR ' (rUntitled, purgeable) {
- "<untitled>"
- };
-
-
-